home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJTST200.ZIP / tests / libc / compat / mntent / getmnt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-20  |  267 b   |  17 lines

  1. #include <stdio.h>
  2. #include <mntent.h>
  3.  
  4. char ns[] = "";
  5.  
  6. int
  7. main(void)
  8. {
  9.   struct mntent *m;
  10.   FILE *f;
  11.   f = setmntent(ns, ns);
  12.   while ((m = getmntent(f)))
  13.     printf("Drive %s, name %s\n", m->mnt_dir, m->mnt_fsname);
  14.   endmntent(f);
  15.   return 0;
  16. }
  17.